<template>
  <div class="activity-list">
    <h3>活动列表</h3>
    <div v-for="activity in activities" :key="activity.id" class="activity-item">
      <h4>{{ activity.title }}</h4>
      <p>{{ activity.description }}</p>
      <p>日期: {{ activity.date }}</p>
      <p>地点: {{ activity.location }}</p>
      <button @click="$emit('edit-activity', activity)">编辑</button>
      <button @click="$emit('delete-activity', activity.id)">删除</button>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    activities: {
      type: Array,
      required: true
    }
  }
}
</script>